const baseX = 50
const baseY = 70
const diffHeight = 170
const diffWidth = 150
const firstW = 160

const list = new Array(12).fill(1)
const nodeList = list.map((item, index) => {
	if (index === 0) {
		item.x = baseX
		item.y = baseY
	}
	const last = index % 5 || 5
	const floor = Math.floor(index / 5)
	if (floor % 2 === 0) {
		// even
		item.x = firstW + (last - 1) * diffWidth
		item.y = baseY + floor * diffHeight
	}
	if (floor % 2 === 1) {
		// odd
		item.x = firstW + (5 - last) * diffWidth
		item.y = baseY + floor * diffHeight
	}

	return item
})

const edgeList = list.map((item, index) => {
	if (index === 0) return
	const last = index % 5 || 5
	const floor = Math.floor(index / 5)
	if (floor % 2 === 0) {
		item.type = 'textEdgeR'
		if (last === 5) {
			item.type = 'textArcEdgeR'
		}
	}
	if (floor % 2 === 1) {
		item.type = 'textEdgeL'
		if (last === 5) {
			item.type = 'textArcEdgeL'
		}
	}

	return item
})

console.log(nodeList)
console.log(edgeList)
